<div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">Ver Mascota</h4>
      </div>
      
      <div class="modal-body">

          <?php 
          $nombre_controlador = 'animales';
          $metodo_ver_todos = 'ver_todos';

          $attributes = array('class' => 'form-horizontal', 'role' => 'form');
          echo form_open('no-action', $attributes); 

          if(!isset($objAnimal)) $objAnimal = new Animal(); 
          ?>

          <?php if(isset($error) && $error != '') { ?>
            <div class="alert alert-danger col-sm-offset-2 col-sm-8"><?=$error?></div>
          <?php } ?>

          <div class="form-group">
            <div class="col-sm-offset-3 col-sm-6">
              <?php 
              $atributos = array('type' => 'hidden',
                                 'name' => 'txt_id',
                                 'id' => 'txt_id', 
                                 'value' => $objAnimal->id); 
              echo form_input($atributos);
              ?> 
            </div>
          </div>

          <div class="form-group">
            <label for="txt_nombre" class="col-sm-3 control-label">Nombre</label>
              <div class="col-sm-6"> 
                <?php 
                $atributos = array('type' => 'text', 
                                   'class' => 'form-control', 
                                   'readonly' => 'readonly',
                                   'id' => 'txt_nombre',
                                   'placeholder' => 'Nombre', 
                                   'value' => $objAnimal->nombre);
                echo form_input($atributos);
                ?> 
              </div>
          </div>

          <div class="form-group">
            <label for="txt_sexo" class="col-sm-3 control-label">Sexo</label>
              <div class="col-sm-6"> 
                <?php 
                $atributos = array('type' => 'text', 
                                   'class' => 'form-control', 
                                   'readonly' => 'readonly',
                                   'id' => 'txt_sexo',
                                   'placeholder' => 'Sexo', 
                                   'value' => ($objAnimal->sexo == 'M' ? 'Macho' : 'Hembra') );
                echo form_input($atributos);
                ?> 
              </div>
          </div>

          <div class="form-group">
            <label for="txt_nac" class="col-sm-3 control-label">Fecha de nacimiento</label>
              <div class="col-sm-6"> 
                <?php 
                $atributos = array('type' => 'text', 
                                   'class' => 'form-control', 
                                   'readonly' => 'readonly',
                                   'id' => 'txt_nac',
                                   'placeholder' => 'Fecha de nacimiento', 
                                   'value' => $objAnimal->fecha_nacimiento);
                echo form_input($atributos);
                ?> 
              </div>
          </div>

          <div class="form-group">
            <label for="txt_especie" class="col-sm-3 control-label">Especie</label>
              <div class="col-sm-6"> 
                <?php 
                $objAnimal->raza->get();
                $objAnimal->raza->especie->get();
                $atributos = array('type' => 'text', 
                                   'class' => 'form-control', 
                                   'readonly' => 'readonly',
                                   'id' => 'txt_especie',
                                   'placeholder' => 'Especie', 
                                   'value' => $objAnimal->raza->especie->nombre);
                echo form_input($atributos);
                ?> 
              </div>
          </div>

          <div class="form-group">
            <label for="txt_raza" class="col-sm-3 control-label">Raza</label>
              <div class="col-sm-6"> 
                <?php 
                $objAnimal->raza->get();
                $atributos = array('type' => 'text', 
                                   'class' => 'form-control', 
                                   'readonly' => 'readonly',
                                   'id' => 'txt_raza',
                                   'placeholder' => 'Raza', 
                                   'value' => $objAnimal->raza->nombre);
                echo form_input($atributos);
                ?> 
              </div>
          </div>

          <div class="form-group">
            <label for="txt_contextura" class="col-sm-3 control-label">Contextura</label>
              <div class="col-sm-6"> 
                <?php 
                $objAnimal->contextura->get();
                $atributos = array('type' => 'text', 
                                   'class' => 'form-control', 
                                   'readonly' => 'readonly',
                                   'id' => 'txt_contextura',
                                   'placeholder' => 'Contextura', 
                                   'value' => $objAnimal->contextura->nombre);
                echo form_input($atributos);
                ?> 
              </div>
          </div>


          <div class="form-group">
            <label for="txt_pelaje" class="col-sm-3 control-label">Pelaje</label>
              <div class="col-sm-6"> 
                <?php 
                $objAnimal->pelaje->get();
                $atributos = array('type' => 'text', 
                                   'class' => 'form-control', 
                                   'readonly' => 'readonly',
                                   'id' => 'txt_pelaje',
                                   'placeholder' => 'Pelaje', 
                                   'value' => $objAnimal->pelaje->nombre);
                echo form_input($atributos);
                ?> 
              </div>
          </div>

          <div class="form-group">
            <label for="txt_color" class="col-sm-3 control-label">Color</label>
              <div class="col-sm-6"> 
                <?php 
                $atributos = array('type' => 'text', 
                                   'class' => 'form-control', 
                                   'readonly' => 'readonly',
                                   'id' => 'txt_color',
                                   'placeholder' => 'Color', 
                                   'value' => $objAnimal->color);
                echo form_input($atributos);
                ?> 
              </div>
          </div>

          <div class="form-group">
            <label for="txt_peso" class="col-sm-3 control-label">Peso</label>
              <div class="col-sm-6"> 
                <?php 
                $atributos = array('type' => 'text', 
                                   'class' => 'form-control', 
                                   'readonly' => 'readonly',
                                   'id' => 'txt_peso',
                                   'placeholder' => 'Peso', 
                                   'value' => $objAnimal->peso);
                echo form_input($atributos);
                ?> 
              </div>
          </div>

          <div class="form-group">
            <label for="txt_signos" class="col-sm-3 control-label">Signos particulares</label>
              <div class="col-sm-6"> 
                <?php 
                $atributos = array('type' => 'text', 
                                   'class' => 'form-control', 
                                   'readonly' => 'readonly',
                                   'id' => 'txt_signos',
                                   'name' => 'txtarea_signos',
                                   'placeholder' => 'Signos particulares',
                                   'rows' => '3',
                                   'value' => $objAnimal->signos_particulares);
                echo form_textarea($atributos);
                ?> 
              </div>
          </div>

          <div class="form-group">
            <label for="txt_obs" class="col-sm-3 control-label">Observaciones</label>
              <div class="col-sm-6"> 
                <?php 
                $atributos = array('type' => 'text', 
                                   'class' => 'form-control', 
                                   'readonly' => 'readonly',
                                   'id' => 'txt_obs',
                                   'name' => 'txtarea_obs',
                                   'placeholder' => 'Observaciones', 
                                   'rows' => '3',
                                   'value' => $objAnimal->observaciones);
                echo form_textarea($atributos);
                ?> 
              </div>
          </div>

          <div class="form-group">
            <label for="txt_ingreso" class="col-sm-3 control-label">Fecha ingreso</label>
              <div class="col-sm-6"> 
                <?php 
                $atributos = array('type' => 'text', 
                                   'class' => 'form-control', 
                                   'readonly' => 'readonly',
                                   'id' => 'txt_ingreso',
                                   'placeholder' => 'Fecha de ingreso a Prevet', 
                                   'value' => $objAnimal->fecha_ingreso);
                echo form_input($atributos);
                ?> 
              </div>
          </div>

          <div class="form-group">
            <label for="txt_prestador" class="col-sm-3 control-label">Prestador</label>
              <div class="col-sm-6"> 
                <?php 
                $objAnimal->prestador->get();
                $atributos = array('type' => 'text', 
                                   'class' => 'form-control', 
                                   'readonly' => 'readonly',
                                   'id' => 'txt_prestador',
                                   'placeholder' => 'Prestador', 
                                   'value' => $objAnimal->prestador->nombre);
                echo form_input($atributos);
                ?> 
              </div>
          </div>

      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Volver</button>
      </div>
      <?php echo form_close();?>
  </div>
</div>